
#include <assert.h>

#include "amsgmanip.hpp"

void	test_001( void )
{
	std::string   msg;
	int   id = 1234;
	std::string   data( "hello, message!" );
	int  ret = AMsgManip::box( msg, id, data );
	assert( 0 == strcmp( msg.c_str(), "1234\thello, message!" ) );

	std::string  data_out;
	int   id_out = 0;
	ret = AMsgManip::unbox( msg, id_out, data_out );
	assert( id == id_out );
	assert( data == data_out );
}


int	main ( void )
{
	test_001();

	return	0;
}

